import {
    action,
    computed,
    observable
} from 'mobx'

export class AppState {
    @observable name = 'zhangsan'

    @observable count = 1

    @observable msg = '内容XXX-msg'

    @computed get total() {
        return `${this.name} 数量：${this.count}`
    }

    @action add = () => {
        this.count += 1
    }
}

const appState = new AppState()

export default appState
